home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- // Copyright (C) 1997-2001 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- // MODIFY THIS AT YOUR OWN RISK
- //
- // Creation Date: Nov 11, 1998
- //
- //
- //
- // Description:
- // This implements the "Subdiv Surface" menu on the modeling menubar.
- //
-
-
- //////////////////////////////////////////////////////////////////////
- global proc string SubdivSurfacesMenuItemToShelf (string $item)
- {
- return $item;
- }
-
- global proc SubdivSurfacesMenu(string $parent)
- //
- // Description:
- // Subdiv Surfaces menu
- //
- {
-
- if (! `isTrue "SubdivUIExists"`) return;
-
- setParent -m $parent;
-
- if (`menu -q -ni $parent` == 0) {
-
- // Texture
- //
- string $textItem=`menuItem -l "Texture" -sm 1 -to 1 -aob true subdTexturesItem`;
- SubdTextureMenu $textItem 0 "ls -sl";
- setParent -m ..;
-
- menuItem -divider true;
-
- // Crease mesh edge or mesh point
- //
- menuItem -l "Full Crease Edge/Vertex" -ecr true
- -ann "Full Crease Subdivision Surface Edge or Vertex (tangent break)"
- -image subdivCrease.xpm
- -echoCommand true
- -c "FullCreaseSubdivSurface"
- subdivCreaseItem;
-
- menuItem -l "Partial Crease Edge/Vertex" -ecr true
- -ann "Partial Crease Subdivision Surface Edge or Vertex (no tangent break)"
- -image subdivPartialCrease.xpm
- -echoCommand true
- -c "PartialCreaseSubdivSurface"
- subdivCreaseSimpleItem;
-
- // UnCrease mesh edge or mesh point
- //
- menuItem -l "Uncrease Edge/Vertex" -ecr true
- -ann "Uncrease Subdivision Surface Edge or Vertex"
- -image subdivUncrease.xpm
- -echoCommand true
- -c "UncreaseSubdivSurface"
- subdivUnCreaseItem;
- menuItem -divider true;
-
- menuItem -l "Mirror" -ecr true
- -ann ("Mirror subdivision surface geometry")
- -image subdivMirror.xpm
- -c "MirrorSubdivSurface"
- subdivMirrorItem;
- menuItem -optionBox 1
- // need to add -i option
- -annotation "Mirror Subdiv Surface Option Box"
- -image subdivMirror.xpm
- -l "Mirror Subdiv Surface Option Box" -ecr false
- -c "MirrorSubdivSurfaceOptions"
- subdivMirrorOptionItem;
-
- menuItem -l "Attach" -ecr true
- -ann ("Attach two subdivision surfaces into a new one ")
- -image subdivAttach.xpm
- -c "AttachSubdivSurface"
- subdivAttachItem;
- menuItem -optionBox 1
- // need to add -i option
- -annotation "Attach Subdiv Surface Option Box"
- -l "Attach Subdiv Surface Option Box" -ecr false
- -image subdivAttach.xpm
- -c "AttachSubdivSurfaceOptions"
- subdivAttachOptionItem;
-
- menuItem -divider true;
-
- menuItem -l "Match Topology"
- -ecr true
- -ann "Match topology (at all levels) of selected subdivision surfaces."
- -image subdivMatchToplogy.xpm
- -c "SubdivSurfaceMatchTopology"
- subdivMatchTopoItem;
-
- menuItem -l "Clean Topology"
- -ecr true
- -ann "Remove unnecessary finer level vertices from selected subdivision surfaces."
- -image subdivCleanToplogy.xpm
- -c "SubdivSurfaceCleanTopology"
- subdivCleanTopoItem;
-
- menuItem -divider true;
-
- menuItem -l "Collapse Hierarchy" -ecr true
- -ann ("Remove a number of low levels of the " +
- "subdivision surface hieararchy")
- -image subdivCollapseHierearchy.xpm
- -c "CollapseSubdivSurfaceHierarchy"
- subdivCollapseItem;
- menuItem -optionBox 1
- // need to add -i option
- -annotation "Collapse Hierarchy Option Box"
- -l "Collapse Hierarchy Option Box" -ecr false
- -image subdivCollapseHierearchy.xpm
- -c "CollapseSubdivSurfaceHierarchyOptions"
- subdivCollapseOptionItem;
-
- menuItem -divider true;
-
- menuItem -l "Standard Mode"
- -ecr true
- -ann "Put the subdivision surface into the standard editing mode."
- -image subdivStandardMode.xpm
- -c "SubdivSurfaceHierarchyMode"
- subdivHierItem;
-
- menuItem -l "Polygon Proxy Mode"
- -ecr true
- -ann "Put the subdivision surface into the polygon proxy mode."
- -image subdivPolyMode.xpm
- -c "SubdivSurfacePolygonProxyMode"
- subdivPolyItem;
-
- menuItem -divider true;
-
- // Subdiv Convert Selection - use PolySelectConvert because
- // it does both poly and subd conversion
- //
- menuItem -l "Convert Selection to Faces" -ecr false
- -c ("PolySelectConvert 1")
- -echoCommand true
- -ann "Convert Selection to subdivision surface faces"
- -image "polyConvertToFace.xpm"
- -dmc "SubdivSurfacesMenuItemToShelf \"PolySelectConvert 1\""
- subdivConvertSelectionFacesItem;
- menuItem -l "Convert Selection to Edges" -ecr false
- -c ("PolySelectConvert 2")
- -echoCommand true
- -ann "Convert Selection to subdivision surface edges"
- -image "polyConvertToEdge.xpm"
- -dmc "SubdivSurfacesMenuItemToShelf \"PolySelectConvert 2\""
- subdivConvertSelectionEdgesItem;
- menuItem -l "Convert Selection to Vertices" -ecr false
- -c ("PolySelectConvert 3")
- -echoCommand true
- -image "polyConvertToVertices.xpm"
- -ann "Convert Selection to subdivision surface vertices"
- -dmc "SubdivSurfacesMenuItemToShelf \"PolySelectConvert 3\""
- subdivConvertSelectionVertsItem;
- menuItem -l "Convert Selection to UVs" -ecr false
- -c ("PolySelectConvert 4")
- -echoCommand true
- -ann "Convert Selection to subdivision surface UVs"
- -image "polyConvertToUVs.xpm"
- -dmc "SubdivSurfacesMenuItemToShelf \"PolySelectConvert 4\""
- subdivConvertSelectionUVsItem;
-
- // Subdiv refine
- //
- menuItem -l "Refine Selected Components" -ecr true
- -c ("RefineSelectedComponents")
- -echoCommand true
- -ann "Refine selected subdivision surface components"
- -image subdivRefineRegion.xpm
- subdivCreateAndRefineRegionItem;
-
- // Subdiv Expand Region
- //
- menuItem -l "Expand Selected Components" -ecr true
- -c ("ExpandSelectedComponents")
- -echoCommand true
- -ann "Expand selected subdivision surface components"
- -image subdivExpandRegion.xpm
- subdivExpandRegionItem;
-
- menuItem -divider true;
-
- menuItem -l "Component Display Level" -sm 1 -to 1 -aob true;
-
- // Finer Mesh Display
- //
- menuItem -l "Finer" -ecr true
- -c "FineLevelComponentDisplay"
- -echoCommand true
- -ann "Finer Level Component Display"
- -image subdivFineMesh.xpm
- subdivFinerMeshItem;
-
- // Coarser Mesh Display
- //
- menuItem -l "Coarser" -ecr true
- -c "CoarseLevelComponentDisplay"
- -echoCommand true
- -annotation "Coarser Level Component Display"
- -image subdivCoarseMesh.xpm
- subdivCoaserMeshItem;
-
- // Base Mesh Display
- //
- menuItem -l "Base" -ecr true
- -c "BaseLevelComponentDisplay"
- -echoCommand true
- -annotation "Base Level Component Display"
- -image subdivBaseMesh.xpm
- subdivBaseMeshItem;
-
- setParent -m ..;
-
- menuItem -l "Component Display Filter" -sm 1 -to 1 -aob true;
-
- // Show all at current level
- //
- menuItem -l "All" -ecr true
- -c "ShowAllComponents"
- -annotation "Show All Components At Current Level"
- -echoCommand true
- subdivShowAllCurrentLevelItem;
-
- // Show editted mesh points at current level
- //
- menuItem -l "Edits" -ecr true
- -c "ShowAllEditedComponents"
- -annotation "Show All Edited Components At Current Level"
- -echoCommand true
- subdivShowEditsCurrentLevelItem;
-
- setParent -m ..;
- }
- }
-
-